﻿<%@ Page Language="C#" MasterPageFile="~/Administrator/Admin.master" AutoEventWireup="true"
    Inherits="Administrator_AdminUsers" Title="Quản trị người dùng" CodeBehind="AdminUsers.aspx.cs" %>

<%@ Register Src="~/Administrator/Controls/PaggingControl.ascx" TagName="PaggingControl"
    TagPrefix="EHT" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h1>
        <asp:Label ID="lbAdminUsers" runat="server" Text="Quản trị người dùng"></asp:Label>
    </h1>
    <p class="submitButton">
        <asp:Button ID="btnAdd" runat="server" Text="Thêm mới người dùng" CssClass="btn_action"
            OnClick="btnAdd_Click" />
    </p>
    <asp:Repeater ID="rpUsers" runat="server" OnItemCommand="rpUsers_ItemCommand">
        <HeaderTemplate>
            <table cellspacing="0" cellpadding="0" class="data-table">
                <thead>
                    <tr>
                        <th class="actions edit">
                            STT
                        </th>
                        <th class="actions edit">
                            Sửa
                        </th>
                        <th class="actions delete">
                            Xóa
                        </th>
                        <th>
                            Tên đăng nhập
                        </th>
                        <th>
                            Email
                        </th>
                        <th>
                            Nhóm
                        </th>
                    </tr>
                </thead>
                <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <%# Container.ItemIndex + 1 %>
                </td>
                <td class="actions edit">
                    <a href='AdminUserIU.aspx?UserName=<%#Eval("UserName")%>'>
                        <img alt="Edit" src="Templates/Images/Edit.png"></a>
                </td>
                <td class="actions delete">
                    <asp:ImageButton ID="ibtn" ImageUrl="Templates/Images/Delete.png" OnClientClick="return confirm('Bạn muốn xóa');"
                        runat="server" CommandName="delete1" CommandArgument='<%#Eval("UserName") %>'
                        BorderStyle="None" />
                </td>
                <th>
                     <asp:Literal ID="ltrUserName" runat="server" Text='<%#Eval("UserName")%>'></asp:Literal>
                </th>
                <td>
                    <%#Eval("Email") %>
                </td>
                 <td>
                     <asp:Literal ID="ltrRole" runat="server"></asp:Literal>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </tbody> </table>
        </FooterTemplate>
    </asp:Repeater>
    <p>
        <EHT:PaggingControl ID="PaggingControl1" runat="server" PageURL="AdminSupports.aspx"
            PageSize="10" />
    </p>
</asp:Content>
